<?php

namespace App\Http\Validate\Systemparam;

use App\Http\Validate\BaseValidate;

/**
 * 系统参数验证器
 */
class Systemparam extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'add') {
            $this->rule = [
                'type' => 'required|in:sys_purchase_company_costs,company_costs,fare',
            ];
            $this->message = [
                'type.required' => '类型不能为空',
                'type.in' => '类型无效',
            ];
        }
    }
}
